Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; } li { float: left; } a { display: block; width: 60px; background-color: #dddddd; } </style> </head> <body> <ul> <li><a href="#home">Home</a></li> <li><a href="#news">News</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#about">About</a></li> </ul> <p><b>Note:</b> If a !DOCTYPE is not specified, floating items can produce unexpected results.</p> <p>A background color is added to the links to show the link area. The whole link area is clickable, not just the text.</p> <p><b>Note:</b> overflow:hidden is added to the ul element to prevent li elements from going outside of the list.</p> </body> <!-- Mirrored from www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_float by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:33:15 GMT --> </html>
Result:
Try it Yourself - © w3schools.com